<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>公司加盟审核</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../res/css/wholesale/font.css">
  <link rel="stylesheet" href="../../res/css/wholesale/xadmin.css">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script type="text/javascript" src="../../res/layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript" src="../../res/js/wholesale/xadmin.js"></script>
</head>
<body>
<div class="demoTable" style="margin-top: 10px;">
    <div class="x-body" >
      <div class="layui-row">
        <div class="layui-form layui-col-md12 x-so">
         <input type="text" name="id" id="demoReload" placeholder="请输入公司名" autocomplete="off" class="layui-input"> 
         	 时间：
		    <input class="layui-input" placeholder="开始日" name="timaStart" id="timaStart" readonly>
          - <input class="layui-input" placeholder="截止日" name="timeEnd" id="timeEnd" readonly>
          <button class="layui-btn" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </div>
     </div>
<table class="layui-table" lay-data="{url:'../../listenCompany/findLeague.action', page:true, id:'idTest'}" lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{field:'companyId', sort: true, align:'center',style='display:none'}">公司ID</th>
      <th lay-data="{field:'companyName', align:'center'}">公司名称</th>
      <th lay-data="{field:'companyAddress',align:'center'}">公司地址</th>
      <th lay-data="{field:'companyType', align:'center',templet:'#companyType'}">公司类型</th>
      <th lay-data="{field:'isva', align:'center',templet:'#auditingStatusType'}">审核状态</th>
      <th lay-data="{field:'openTime', align:'center',templet:'#openTime'}">操作时间</th>
      <th lay-data="{field: 'rigth', align:'center',fixed: 'right',  toolbar: '#barDemo'}">操作</th>
    </tr>
  </thead>
</table>
 </div>
 </div>

<script type="text/html" id="barDemo">
  
  {{ subMitType(d) }}
</script>
 
<script type="text/html" id="auditingStatusType">
     {{# if(d.isva == 0) { }}
     <div>等待总经理审核</div>
	 {{# } else if(d.isva == 2){ }}
     <div>未通过审核</div>
    
{{# }}}
 </script>
 <script type="text/html" id = "companyType">
	{{# if(d.companyType == 1) { }}
		<div>分公司</div>
	{{# } }}
</script>
 <script type="text/javascript">
 	function subMitType(d){
 		var  Subhtml = "";
 		if(d.isva==2){
 			Subhtml='<a class="layui-btn layui-btn-danger layui-btn-xs layui-btn-disabled" >审核</a><a class="layui-btn layui-btn-xs" lay-event="detail">审核记录</a>';
 		}else{
 			Subhtml='<a class="layui-btn layui-btn-danger layui-btn-xs " lay-event="audit">审核</a><a class="layui-btn layui-btn-xs" lay-event="detail">审核记录</a>';
 		}
 		return Subhtml;
 	}
 </script>  
 <script type="text/javascript" id="openTime">
{{ formatDateTime(d.openTime) }}  
</script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="../../res/js/wj/common.js"></script>
<script type="text/javascript" src="../../res/js/leagueAudit/leagueAudit.js"></script>
</body>
</html>